Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new dynamic priority fee mechanism by adding support for fee history retrieval and updating transaction configuration accordingly.
- Adds safeFeeHistory method to safely wrap fee history queries in the common viem client utility.
- Updates TransactionManager configuration to use a new gas property with explicit EIP-1559 and fee parameters.
- Modifies GasPriceOracle to use the calculated target priority fee when suggesting gas fees.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| support/common/lib/utils/safeViemClients.ts | Adds safeFeeHistory wrapper method with error handling |
| packages/txm/lib/TransactionManager.ts | Introduces a new gas config block and updates fee parameters |
| packages/txm/lib/GasPriceOracle.ts | Updates fee calculations and introduces asynchronous block handling |
| apps/randomness/src/index.ts | Updates configuration to use the new gas configuration format |
Files not reviewed (1)
- contracts/src/happy-accounts/samples/executors/BatchCallExecutor.sol: Language not supported
db14c74 to
db7aedd
Compare
c10757e to
f9acbe6
Compare
db7aedd to
cc22eb4
Compare
f9acbe6 to
22fd6dd
Compare
HAPPY-372 Estimate `maxPriorityFeePerGas`
Implement a mechanism to predict the recommended Context: #416 (comment) |
cc22eb4 to
32771ef
Compare
22fd6dd to
6e7f328
Compare
32771ef to
5801281
Compare
6e7f328 to
a1cf861
Compare
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "HappyCounter": "0x8D45cAd49F37CC512DAFFE6700ddc98084867E68", | |||
| "MockGasBurner": "0xdA504Bb1b736b04A5Aec28fD5d693Ad7447Ad438", | |||
There was a problem hiding this comment.
dunno whats going on with the network unknown, likely a mismatch with chainId's. dont think the contracts are changed so can probably just remove the deployments completely
| safeGetTransactionCount: ( | ||
| ...args: Parameters<ViemPublicClient["getTransactionCount"]> | ||
| ) => ResultAsync<Awaited<ReturnType<ViemPublicClient["getTransactionCount"]>>, GetTransactionCountErrorType> | ||
| safeFeeHistory: ( |
There was a problem hiding this comment.
nit: lets fully qualify this -> safeGetFeeHistory, so there isnt any confusion as to the underlying RPC method
packages/txm/lib/GasPriceOracle.ts
Outdated
| @@ -37,7 +39,7 @@ export class GasPriceOracle { | |||
| this.onNewBlock(block) | |||
There was a problem hiding this comment.
think we need to await here, now that its async?
b2d5509 to
ed80362
Compare
b09dfe0 to
6ed51b5
Compare
ed80362 to
a1fd330
Compare
6ed51b5 to
a3d1d4d
Compare
a1fd330 to
150a533
Compare
a3d1d4d to
0c8f54d
Compare
150a533 to
bdd1d5c
Compare
0c8f54d to
d72d783
Compare
bdd1d5c to
d5bfe00
Compare
d72d783 to
75f46bf
Compare
d5bfe00 to
44f4247
Compare
75f46bf to
c884815
Compare
44f4247 to
1f2858b
Compare
1f2858b to
1356e03
Compare

Linked Issues
Description
This PR introduces a new dynamic priority fee mechanism by adding support for fee history retrieval and updating transaction configuration accordingly
Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Reminder: PR review guidelines
Correctness
testnet, mainnet, standalone wallet, ...).
< INDICATE BROWSER, DEMO APP & OTHER ENV DETAILS USED FOR TESTING HERE >
< INDICATE TESTED SCENARIOS (USER INTERFACE INTERACTION, CODE FLOWS) HERE >
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.
packages/coreandpackages/react), see here for more info.